Skip to content

codec9 checked encoder; DR512 naming; add_pm wasm rows in CI - #434

Merged
AdaWorldAPI merged 3 commits into
masterfrom
ccr-85acaff0-oszq40-dr512-qualify
Nov 15, 2026
Merged

AdaWorldAPI merged 3 commits into
masterfrom
ccr-85acaff0-oszq40-dr512-qualify

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Summary

Three small items from the DR512 review.

  • Checked encoder. Codec9::encode_touched_checked and Codec9Runtime::encode_touched_checked return a Quantized9:

    • Lane(lane) when the quantized magnitude fits 255. This is the same lane encode_touched returns, including the -0.49999 → +0 rule.
    • Wide(exact) when it does not, instead of saturating to 255.

    A value whose quantized form is outside i64 is refused with the new Codec9Error::OutOfRange; no crate outside codec9.rs names Codec9Error. Input now has the same exact escape that abakus::pm gives arithmetic.

  • DR512 naming (DECISION, in dr512-epistemic-pm-invariant.md).

    • "DR512" names the representation: 512 codewords. It has nothing to do with lance-graph's DR64/DR256 position counts or with dt64::dr addressing.
    • The arithmetic is "Abakus pm".
    • The same doc states the rule that never touched is the identity of add_pm and NaN after decoding: decode(add_pm(⊥, +5)) = 5, while decode(⊥) + decode(+5) = NaN. Add first, then decode. A test in abakus::pm pins both results.
  • wasm rows in CI. criterion is used by benches only and does not build for wasm32-wasip1, so it moves to a cfg(not(target_arch = "wasm32")) dev-dependency table. tests/add_pm.rs then builds for wasm unchanged. scripts/add-pm-backends.sh gains two arms, run in the existing wasm job under node's WASI (scripts/wasi-test-run.mjs):

    • wasm (+simd128, the simd_wasm realization);
    • wasm-scalar (no simd128, the scalar backend).

Evidence

  • cargo test --lib -- hpc::codec9 hpc::abakus: 17 tests pass, 3 of them new.
  • Disables:
    • checked encoder saturates instead of escaping → checked_encode_escapes_instead_of_saturating red;
    • never touched decodes to 0 instead of NaN → the new pin plus 2 existing codec9 tests red.
  • scripts/add-pm-backends.sh wasm and wasm-scalar each run 11 tests and pass locally. The two binaries are distinct builds.
  • These all pass: cargo check --benches, cargo clippy --features std --lib --tests -D warnings, cargo fmt --check, and facet-stride-guard --diff origin/master (no hits).

Generated by Claude Code

- Codec9::encode_touched_checked and Codec9Runtime::encode_touched_checked
  return Quantized9::Lane (the same lane encode_touched gives) when the
  quantized magnitude fits 255, and Quantized9::Wide(exact) when it does
  not, instead of saturating. Outside i64: Codec9Error::OutOfRange.
- dr512-epistemic-pm-invariant: DR512 names the representation (512
  codewords); the arithmetic is Abakus pm. Never touched is the identity of
  add_pm and NaN after decode: add, then decode.
- abakus::pm: the same rule in the module doc, pinned by a test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMNZqKXSaeb9g2ypywF
criterion is benches-only and does not build for wasm32-wasip1, so it
moves to a cfg(not(wasm32)) dev-dependency table. tests/add_pm.rs then
builds for wasm32-wasip1 as it is; scripts/add-pm-backends.sh gains wasm
(+simd128, the simd_wasm realization) and wasm-scalar arms, run under node's
WASI (scripts/wasi-test-run.mjs), 11 tests each. Both run in the wasm job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMNZqKXSaeb9g2ypywF
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2f94f412-3070-49f3-8bfc-d0458791db22
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review November 15, 2026 19:07
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T19:08:34.179482Z 1e34671 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Pm derived PartialEq, which needs U8x64: PartialEq; the nightly-simd
realization's U8x64 does not implement it, so master's nightly row has
been red since #433. Pm now compares pos and mag.to_array().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMNZqKXSaeb9g2ypywF

AdaWorldAPI commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner Author

realization/nightly × x86_64 was red, and the cause is not this PR's change: master has failed this row since #433 (run 344). Pm derived PartialEq, which requires U8x64: PartialEq, and the nightly-simd realization's U8x64 does not implement it.

Fixed here in 8b1a79d: Pm now compares pos and mag.to_array().

Checked locally with nightly:

  • cargo +nightly build --lib --features nightly-simd compiles (it failed before the change with the same E0369);
  • scripts/masking-parity.sh nightly passes;
  • the row's lib tests, plus hpc::abakus, pass: 260 tests.

Generated by Claude Code

@AdaWorldAPI
AdaWorldAPI merged commit bf112d2 into master Nov 15, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants